package cn.kgc.annotation;

import cn.kgc.validator.CheckPmsBrandNameValidator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 验证品牌名字不能为空
 */
@Target({ElementType.TYPE})//表示自定义注解可以用在类上
@Retention(RetentionPolicy.RUNTIME)
@Constraint(validatedBy = CheckPmsBrandNameValidator.class)
public @interface CheckPmsBrandNameAnnotation {
    String message();
    /**
     * 自定义JSR303验证注解,下面两个属性必须加上的
     * @return
     */
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
}
